<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <title>Lidar web tool</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="layui/css/layui.css" media="all">
</head>

<body>
  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
    <legend>雷达功能设置区域</legend>
  </fieldset>

  <div class="layui-tab layui-tab-card">
    <ul class="layui-tab-title">
      <li class="layui-this">设备运行</li>
      <li>获取雷达参数</li>
      <li>设置雷达网络参数</li>
      <!-- <li>设置雷达硬件参数</li> -->
      <li>雷达点云数据</li>
      <!-- <li>防区读写(防区款雷达)</li> -->
      <li>其他</li>
    </ul>
    <div class="layui-tab-content">
      <div class="layui-tab-item layui-show">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 控制雷达的四种动作(初始为启动状态)
        </blockquote>
        <button type="button" id="LSTARH" class="layui-btn layui-btn-radius" onclick="action(id)">启动雷达</button>
        <button type="button" id="LSTOPH" class="layui-btn layui-btn-radius" onclick="action(id)">关闭旋转</button>
        <button type="button" id="LRESTH" class="layui-btn layui-btn-radius" onclick="action(id)">重启雷达</button>
        <button type="button" id="LMEASH" class="layui-btn layui-btn-radius" onclick="action(id)">固定测距</button>
      </div>
      <div class="layui-tab-item">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 网络款以及防区款可以获得所有的数据,串口款仅获得序列号
        </blockquote>
        <button type="button" class="layui-btn layui-btn-radius" onclick="getDevInfo()">重新获取</button>
        <form class="layui-form">
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">型号</label>
              <div class="layui-input-inline">
                <input type="tel" id="NSP" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">编号</label>
              <div class="layui-input-inline">
                <input type="text" id="DID" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">序列号</label>
              <div class="layui-input-inline">
                <input type="text" id="UID" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">IP地址</label>
              <div class="layui-input-inline">
                <input type="text" id="IPv4" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">子网掩码</label>
              <div class="layui-input-inline">
                <input type="text" id="mask" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">网关地址</label>
              <div class="layui-input-inline">
                <input type="text" id="gateway" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">上传IP</label>
              <div class="layui-input-inline">
                <input type="text" id="srv_ip" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">雷达udp端口号</label>
              <div class="layui-input-inline">
                <input type="text" id="srv_port" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">主机本地端口号</label>
              <div class="layui-input-inline">
                <input type="text" id="local_port" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">转速</label>
              <div class="layui-input-inline">
                <input type="text" id="RPM" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">电机启动参数</label>
              <div class="layui-input-inline">
                <input type="text" id="PUL" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">FIR滤波阶数</label>
              <div class="layui-input-inline">
                <input type="text" id="FIR" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">圈数</label>
              <div class="layui-input-inline">
                <input type="text" id="cir" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">分辨率</label>
              <div class="layui-input-inline">
                <input type="text" id="with_resample" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">开机自动上传</label>
              <div class="layui-input-inline">
                <input type="text" id="ATS" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">固定上传</label>
              <div class="layui-input-inline">
                <input type="text" id="TFX" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">数据点平滑</label>
              <div class="layui-input-inline">
                <input type="text" id="SMT" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">去拖点</label>
              <div class="layui-input-inline">
                <input type="text" id="DSW" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">去拖点系数</label>
              <div class="layui-input-inline">
                <input type="text" id="AF" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>


            <div class="layui-inline">
              <label class="layui-form-label">记录校正系数</label>
              <div class="layui-input-inline">
                <input type="text" id="ERR" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">网络心跳</label>
              <div class="layui-input-inline">
                <input type="text" id="net_watchdog" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">记录IO口极性</label>
              <div class="layui-input-inline">
                <input type="text" id="PNP" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">数据报警/信息类型</label>
              <div class="layui-input-inline">
                <input type="text" id="PST" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">硬件版本号</label>
              <div class="layui-input-inline">
                <input type="text" id="version" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

          </div>
        </form>
      </div>
      <div class="layui-tab-item ">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 设置雷达的网络参数,仅网络款,防区款使用,输入框中的数据为参考格式
        </blockquote>
        <form class="layui-form">
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">雷达IP</label>
              <div class="layui-input-inline">
                <input id="setIPv4" autocomplete="off" lay-verify="require|ip" class="layui-input" value=""
                  placeholder="192.168.0.110">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">子网掩码</label>
              <div class="layui-input-inline">
                <input id="setmask" autocomplete="off" lay-verify="require|ip" class="layui-input" value=""
                  placeholder="255.255.255.0">
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">网关</label>
              <div class="layui-input-inline">
                <input id="setgateway" autocomplete="off" lay-verify="require|ip" class="layui-input" value=""
                  placeholder="192.168.0.1">
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">端口</label>
              <div class="layui-input-inline">
                <input id="setlocal_port" autocomplete="off" lay-verify="require|number" class="layui-input" value=""
                  placeholder="6543">
              </div>
            </div>
            <div class="layui-inline">
              <button type="button" class="layui-btn layui-btn-radius" lay-submit=""
                onclick="setDevInfo(2)">设置发送参数</button>
            </div>
          </div>
        </form>

        <form class="layui-form">
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">接收端主机IP</label>
              <div class="layui-input-inline">
                <input id="setsrv_ip" autocomplete="off" lay-verify="require|ip" class="layui-input" value=""
                  placeholder="192.168.0.75">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">接收端主机端口</label>
              <div class="layui-input-inline">
                <input id="setsrv_port" autocomplete="off" lay-verify="require|number" class="layui-input" value=""
                  placeholder="6668">
              </div>
            </div>
            <div class="layui-inline">
              <button type="button" class="layui-btn layui-btn-radius" lay-submit=""
                onclick="setDevInfo(3)">设置接收参数</button>
            </div>
          </div>

        </form>
      </div>
      <!-- <div class="layui-tab-item">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 设置雷达的参数,仅网络款,防区款使用,输入框中的数据为参考格式
        </blockquote>
        <div class="layui-row">
          <div class="layui-col-md1">
            <label class="layui-form-label">转速</label>
            <input id="setRPM" autocomplete="off" class="layui-input" value="" placeholder="600/900/1200/1500">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">偏差</label>
            <input id="setERR" autocomplete="off" class="layui-input" value="" placeholder="-99~+99">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">机器类型</label>
            <input id="setNSP" autocomplete="off" class="layui-input" value="" placeholder="LDS-50C-S-UH">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">机器序号</label>
            <input id="setUID" autocomplete="off" class="layui-input" value="" placeholder="201812030001H">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">设备ID</label>
            <input id="setDID" autocomplete="off" class="layui-input" value="" placeholder="10">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">滤波圈数</label>
            <input id="setFIR" autocomplete="off" class="layui-input" value="" placeholder="01~99">
          </div>
          <!-- <div class="layui-col-md1">
            <label class="layui-form-label">电机脉冲数</label>
            <input id="setPUL" autocomplete="off" class="layui-input" value=""  placeholder="0500~4000">
          </div>
          <div class="layui-col-md1">
            <label class="layui-form-label">版本号</label>
            <input id="setVERSION" autocomplete="off" class="layui-input" value="" placeholder="V">
          </div> -->
          <!-- <form class="layui-form ">
            <div class="layui-col-md1">
              <label class="layui-form-label">IO类型</label>
              <div class="layui-input-inline">
                <select id="setPNP" lay-filter="IO">
                  <option value="0">NPN</option>
                  <option value="1">PNP</option>
                </select>
              </div>
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">数据平滑</label>
              <div class="layui-input-inline">
                <select id="setSMT" lay-filter="SMT">
                  <option value="0">关闭</option>
                  <option value="1">打开</option>
                </select>
              </div>
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">去拖点</label>
              <div class="layui-input-inline">
                <select id="setDSW" lay-filter="DSW">
                  <option value="0">关闭</option>
                  <option value="1">打开</option>
                </select>
              </div>
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">去拖点系数</label>
              <input id="setAF" autocomplete="off" class="layui-input" value="" placeholder="0~200">
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">开机自动上传</label>
              <div class="layui-input-inline">
                <select id="setATS" lay-filter="DSW">
                  <option value="0">不上传</option>
                  <option value="1">网络上传</option>
                  <option value="2">USB上传</option>
                </select>
              </div>
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">固定上传地址</label>
              <div class="layui-input-inline">
                <select id="setTFX" lay-filter="DSW">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>

            <div class="layui-col-md1">
              <label class="layui-form-label">信息上传类型</label>
              <div class="layui-input-inline">
                <select id="setPST" lay-filter="DSW">
                  <option value="0">无</option>
                  <option value="1">数据</option>
                  <option value="2">报警</option>
                  <option value="3">数据+报警</option>
                </select>
              </div>
            </div>
          </form>
          <div class="layui-row">
            <div class="layui-col-md2 layui-col-md-offset5">
              <button type="button" class="layui-btn layui-btn-fluid " onclick="setDevInfo()">设置</button>
            </div>
          </div>
        </div>

      </div> --> -->
      <div class="layui-tab-item">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 对雷达页面数据的刷新显示，并不调整雷达的运行<br>
          (特殊说明:仅获取全扇区角度的时候绘制界面,单扇区角度的时候绘制会刷新过快无法显示 配置文件设置 output_360:0)
        </blockquote>
        <button type="button" class="layui-btn layui-btn-radius" onclick="getPointsData()">获取雷达数据</button>
        <button type="button" class="layui-btn layui-btn-radius" onclick="stopGetData()">停止获取雷达数据</button>
        <form class="layui-form">
          <div class="layui-form-item">
            <label class="billRule-layui-form-label">设置雷达的点位大小</label>
            <div class="layui-input-inline">
              <select id="selectSize" lay-filter="size">
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
              </select>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">时间戳(秒)</label>
              <div class="layui-input-inline">
                <input type="text" id="timestamp_s" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">时间戳(微秒)</label>
              <div class="layui-input-inline">
                <input type="text" id="timestamp_us" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">点数</label>
              <div class="layui-input-inline">
                <input type="text" id="index" readonly="true" autocomplete="off" class="layui-input">
              </div>
            </div>
          </div>
        </form>
      </div>
      <!-- <div class="layui-tab-item">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 功能说明读取当前防区,设置当前防区(矩形为)
        </blockquote>
        <button type="button" id="readZone" class="layui-btn layui-btn-radius" onclick="readZone()">读取防区</button>
        <button type="button" id="writeZone" class="layui-btn layui-btn-radius" onclick="writeZone()">设置防区</button>
        <form class="layui-form">
          <div class="layui-form-item">
        <div class="layui-col-md2">
          <label class="layui-form-label">选择防区绘制</label>
          <div class="layui-input-inline">
            <select id="setZoneGraphics" lay-filter="zone">
              <option value="rect">矩形</option>
              <option value="sector">扇形</option>

            </select>
          </div>
        </div>
        <div class="layui-col-md2">
          <label class="layui-form-label">选择三区</label>
          <div class="layui-input-inline">
            <select id="setZoneAlarm" >
              <option value="0">观察区</option>
              <option value="1">警戒区</option>
              <option value="2">报警区</option>
            </select>
          </div>
        </div> 
        <div class="layui-col-md2">
          <label class="layui-form-label">选择防区</label>
          <div class="layui-input-inline">
            <select id="setZone" >
              <option value="0">0</option>
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
              <option value="6">6</option>
              <option value="7">7</option>
              <option value="8">8</option>
              <option value="9">9</option>
              <option value="A">A</option>
              <option value="B">B</option>
              <option value="C">C</option>
              <option value="D">D</option>
              <option value="E">E</option>
              <option value="F">F</option>
            </select>
          </div>
        </div> 
        <div class="layui-col-md1">
          <label id="valueL" class="layui-form-label">左</label>
          <input id="zoneL" autocomplete="off" class="layui-input" value="0" placeholder=">0">
        </div>
        <div class="layui-col-md1">
          <label id="valueT" class="layui-form-label">上</label>
          <input id="zoneT" autocomplete="off" class="layui-input" value="0" placeholder="0-3600">
        </div> 
        
        <div class="layui-col-md1">
          <label id="valueR" class="layui-form-label">右</label>
          <input id="zoneR" autocomplete="off" class="layui-input" value="100" placeholder=">0">
        </div> 
        <div class="layui-col-md1">
          <label id="valueB" class="layui-form-label">下</label>
          <input id="zoneB" autocomplete="off" class="layui-input" value="-50" placeholder=">0">
        </div>
        <div class="layui-col-md1">
          <label class="layui-form-label">&nbsp;</label>
        <button type="button" id="showZone" class="layui-btn layui-btn-radius" onclick="ShowZone()">新增防区</button>
      </div>
      <div class="layui-col-md1">
        <label class="layui-form-label">&nbsp;</label>
      <button type="button" id="clearZone" class="layui-btn layui-btn-radius" onclick="ClearZone()">全部清除</button>
    </div>
    </div>
    </form>
      </div>  -->

      <div class="layui-tab-item">
        <blockquote class="layui-elem-quote layui-text" style="margin-top: 15px;">
          说明介绍: 额外的一些功能
        </blockquote>
        <button type="button" class="layui-btn layui-btn-radius" onclick="showClientTable()">获取当前连接的客户端</button>
        <button type="button" class="layui-btn layui-btn-radius" onclick="showLidarTable()">获取当前雷达设备列表</button>
      </div> 
  <div class="layui-fluid">
    <div class="layui-row">
      <div id="container" style="width:800px;height:800px;margin: 0px auto;"></div>
    </div>
  </div>
</div>
</div>
</body>
<script src="jquery-1.11.0.min.js"></script>
<script src="echarts.min.js"></script>
<script src="./layui/layui.js" charset="utf-8"></script>
<script src="bluesea.js"></script>
  
<style type="text/css">
  .layui-form-label {
    width: 100px;
  }
</style>

</html>